/* eslint-disable no-shadow */


/**
 * 获取所有行政区划
 * @returns 区域列表
 */
export function allRegions(maxLevel) {
  return RSocket.rs({
    route: 'dicts.region.items',
    args: {
      search: { fullId: `^[^:]*(:[^:]+){0,${maxLevel - 1}}$` },
      pg: { page: 0, size: 1000000, sort: ['itemId;asc'] },
    },
  });
}

